<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>精选板块最高、次高折线图</title>
		<link href="css/text.css" rel="stylesheet" type="text/css" />
		<style type="text/css">						
			#towriter{
				margin-top:-15px;
				border: 1px solid #555555;
				height:100%;				
			}			
			.fixedBox{
				border:none;
				white-space: nowrap;
			}
			.fixedBox::-webkit-scrollbar {
				width: 10px;     
				height: 10px;				
			}			
			p {margin-top:0px;margin-bottom:5px}				
			
			table{
				width:80px; 
				border-collapse:collapse; 
				text-align:center;
			}
			td,th{border:1px solid #696969}
			th { 
				color:#E5E5E5;  <!-- 表头文字颜色 -->
			}
			td a:link{
				color:#E5E5E5;  <!-- 列表文字颜色 -->
			}	
			
			#bar, #bar1{
				padding-top: 1px;
				height: 25px;								
				background-color: #666;
				<!-- cursor: move; -->
			}			
			
			#content, #content1{				
				height: 450px;
				background-color: #000;  <!-- 弹出框背景色 -->
				white-space: nowrap;
				overflow:auto;				
			}
			
			#content::-webkit-scrollbar, #content1::-webkit-scrollbar{
				width: 12px;     
				height: 12px;
				scrollbar-arrow-color:white;
				background-color: #E5E5E5;		
			}
			#content::-webkit-scrollbar-thumb, #content1::-webkit-scrollbar-thumb{
				border-radius: 5px;
				-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
				background: rgba(0,0,0,0.2);
				scrollbar-arrow-color:#555;
			}
			#content::-webkit-scrollbar-track, #content1::-webkit-scrollbar-track {
				-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
				border-radius: 0;
				background: rgba(0,0,0,0.1);
			}
		</style>
	</head>
	<body>		
		<div id="towriter" class="fixedBox" style="display:none;">
			<div id="towrit" class="fixedBox" style="position:relative;">
				<div id="title" style="margin:10px 50px -5px 5px;"></div>				
				<div id="charts3" style="position:relative; float:left;margin:0px 0px 0px -20px; border:1px solid #555;"></div>									
			</div>
		</div>
		
		<script type="text/javascript" src="js/json2html.js"></script>
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="DatePicker/WdatePicker.js"> </script> 
		<script type="text/javascript" src="js/echarts.js"></script>
		<script>
			var x = 30; //显示数量
			if(localStorage.getItem('bkldzrq') != null) { //增加数量 重建日期缓存
				var t = localStorage.getItem('bkldzrq');
				if(x > t.split(';').length - 1){										
					localStorage.removeItem('bkldzrq'); 					
				}	
			}
			
			var z = 1;   //最高板（1、显示2板及以上；0、只显示最高板）			
			var day = new Date();
			var dt = "";  //当日
			var tt = "";
			var tt1 = "";
			var k = 0;			
			window.onload = function() {
				dt = day.Format("yyyy-MM-dd");
				changeStyle();				
				getSource();												
			}
			
			var ztssx = 0;
			function time_range(beginTime, endTime) {
				var strb = beginTime.split(":");
				if (strb.length != 2) {
					return false;
				}

				var stre = endTime.split(":");
				if (stre.length != 2) {
					return false;
				}

				var b = new Date();
				var e = new Date();
				var n = new Date();

				b.setHours(strb[0]);
				b.setMinutes(strb[1]);
				e.setHours(stre[0]);
				e.setMinutes(stre[1]);

				if (n.getTime() - b.getTime() > 0 && n.getTime() - e.getTime() < 0) {
					day = new Date();
					ztssx++;					
					if(ztssx == 5){ //定时刷新涨停数
						ztssx = 0;
						ztemp = "";	
					}		
					getSource();					
					const interval = setInterval(function(){
						if(rid != "" && y == 1){
							changeCss(rid,qid);
							clearInterval(interval);
						}					
					},100);					
					
					if(sx == 1){
						showInform(ztgp);					
					}

					if(lbt == dt){
						setTimeout(function(){lbtt()}, 100); 				
					}
					console.log(true)　　　　　　
					return true;				
				} else {
					console.log(false)
				    return false;     
				}
			}　　　
   　　　
			$(function() {
				setInterval(function() {
					if(k == 0){		//最后交易日才刷新		
						time_range("9:00","15:15")	
					}							
				},
				60000);
			})			
			
			function changeStyle() {
				var obj = document.getElementById("towriter");
				obj.style.display= "block"; 	
				obj.style.left= "0px"; 				
				obj.style.width= "100%";	
				
				var obj1 = document.getElementById("towrit");				
				obj1.style.left= "0px"; 				
				obj1.style.width= "100%";			
				//obj1.style.border= "1px solid #696969";
				
				var obj2 = document.getElementById("charts3");	
				obj2.style.top= "10px";
				obj2.style.left= "0px"; 				
				obj2.style.width= "100%";
				obj2.style.height= "300px";					
			}					
			
			function keepTwoDecimal(num) {  
               var result = parseFloat(num);  
               if (isNaN(result)) {  
                   //alert('传递参数错误，请检查！');  
                   return false;  
               }  
               result = Math.round(num * 100) / 100;  
               return result;  
			};			
						
			function NumberTransform(num) { 
				var result = parseFloat(num);
				if (isNaN(result)) {                    
                   return false;  
               }  				
               if(Math.abs(result) > 100000000){
				result = result / 100000000;
				result = result.toFixed(2) + "亿";
			   }else if(Math.abs(result) > 10000){
			    result = result/10000;
				result = result.toFixed(0) + "万";
			   }
               return result;  
			};
			
			Date.prototype.Format = function (fmt) {
				var o = {
				"M+": this.getMonth() + 1, //月份
				"d+": this.getDate(), //日
				"h+": this.getHours(), //小时
				"m+": this.getMinutes(), //分
				"s+": this.getSeconds(), //秒
				"q+": Math.floor((this.getMonth() + 3) / 3), //季度
				"S": this.getMilliseconds() //毫秒
				};
				if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
				for (var k in o)
				if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
				return fmt;
			};
			
			function cDayFunc(dp) { 
				var date = dp.cal.getNewDateStr();            
				BookingRmk(date);//调用其它函数并带上参数                
			}
			
			function BookingRmk(date){         				
				tt1 = date;
				var date1 = new Date(tt1);
				var date2 = new Date(dt);
				if(date1 < date2){
					k = 1;					
				}else{
					k = 0;
					tt1 = dt;
				}				
				a = 0;  //切换日期，清零
				tz = "";
				getSource();				
			}
			
			var pn = -1;
			function prev(){  //前一天
				pn = -1;
				var day = new Date(tt1);	
				day.setTime(day.getTime() - 24*60*60*1000);	
				tt1 = day.Format("yyyy-MM-dd");				
				BookingRmk(tt1);
			}
			
			function next(){  //后一天 				
				pn = 1;
				var day = new Date(tt1);	
				day.setTime(day.getTime() + 24*60*60*1000);	
				tt1 = day.Format("yyyy-MM-dd");				
				BookingRmk(tt1);							
			}
			
			var y = 0;
			var bjs = "";
			var rqs = ""; //判断交易日用(缓存)
			var tz = "";  //折线图用 rq
			var a = 0; 
			var b = 0;
			function getSource() {
				y = 0;
				var div = document.getElementById("title");
				var qh = "<a style='position:absolute; right:110px;' href='javascript:void(0)' onclick='clearstorage()'>" + "清除缓存" + "</a>";
				var ds = "<span id='ds' style='position:absolute; left:960px;'>" + bjs + "<span>";
				div.innerHTML = '<font color=#FF8C00; size="3">精选板块轮动<font size="1">&nbsp;&nbsp;&nbsp;&nbsp;' + qh + ds + '</font></font><input style="width: 90px;" type="text" id="PriceDate" name="PriceDate" class="Wdate" onFocus="WdatePicker({ onpicking: cDayFunc})" />';		
				var back = '<a href="javascript:prev();"  style="padding-left:10px;font-size:16px;color:#fff;">←</a>';				
				var forward = '<a href="javascript:next();"  style="font-size:16px;color:#fff;">→</a>';
				div.innerHTML += back + forward ;
				
				var url1 = "https://apphq.longhuvip.com/w1/api/index.php?Order=1&a=RealRankingInfo&st=30&apiv=w21&Type=1&c=ZhiShuRanking&PhoneOSNew=1&ZSType=7";
				if(k == 0){				
					$.ajax({
						type: "get",
						url: url1,
						dataType: "json",
						async : false,
						cache:false,
						timeout:3000,					
						success: function(data) {					
							//alert(JSON.stringify(data))						
							//document.write(JSON.stringify(data));															
							tt1 = data.Day;							
							dt = tt1;
							day = new Date(tt1);
							rqs = tt1 + ";";  //判断交易日用										
						}
					});						
				}else{
					day = new Date(tt1);
					day.setTime(day.getTime());				
					for (i = 1; i < 100; i++){
						if(i > 1){
							day.setTime(day.getTime() + pn*24*60*60*1000);							
						}
						tt1 = day.Format("yyyy-MM-dd");						
						if(tt1 == dt){	
							k = 0;								
							getSource();
							break;
						}
						var urlt = "https://apphis.longhuvip.com/w1/api/index.php?Order=1&a=RealRankingInfo&st=30&apiv=w26&Type=1&c=ZhiShuRanking&PhoneOSNew=1&ZSType=7&Date=" + tt1; 					
						var res1 = [];
						$.ajax({
							type: "get",
							url: urlt,
							dataType: "text",
							async : false,
							cache:false,
							timeout:3000,						
							success: function(data) {							
								if(data.indexOf("MYSQL数据库链接出错!") == -1 && data.indexOf('"list":[]') == -1 && data.indexOf('"errcode":1020') == -1){
									var arr = JSON.parse(data);
									res1 = arr.list;								
								}else{
									res1.push("");
								}														
							}
						});
						if(res1[0].length != 0){							
							break;
						}
					}
				}
				
				var url2 = "https://apphis.longhuvip.com/w1/api/index.php?Order=1&a=RealRankingInfo&st=30&apiv=w26&Type=1&c=ZhiShuRanking&PhoneOSNew=1&ZSType=7&Date=" + tt1; 			
				var url = url1;
				if(k == "1"){
					url = url2;
				}
				var res = [];
				$.ajax({
					type: "get",
					url: url,
					dataType: "json",
					async : false,
					cache:false,
					timeout:3000,					
					success: function(data) {					
						//alert(JSON.stringify(data))						
						//document.write(JSON.stringify(data));															
						for (i = 0; i < data.list.length; i++){
							res.push({"code":data.list[i][0],"name":data.list[i][1],"qd":data.list[i][2],"zf":data.list[i][3]});							
						}											
					}
				});	
								
				document.getElementById("PriceDate").value = tt1;	
				
				if(res.length != 0){
					Ctable(tt1,JSON.stringify(res));						
				}
				
				y = 1;					
				
				if(k == 0){					
					if(dt == tt1 && b == 0){ //竞价后切换
						a = 0;
						b++;
					}
					a++;						
					if(a == 1){  //刷新或竞价后执行一次							
						gethis(); //交易日推算							
					}
				}else{
					gethis();						
				}	
				
				setTimeout(function(){lbtt()}, 200);  //延时执行
			}
			
			var datahis = "";
			function gethis() {			
				if(localStorage.getItem('bkldzrq') != null) {  //判断有无缓存日期
					var t = localStorage.getItem('bkldzrq'); //取缓存日期
					//alert(t)
					if(t.split(";")[0] != tt1){  //如果缓存首日不等于最后交易日，重新计算					
						for (j = 1; j < x; j++){															
							gethisdata();														
							Ctable(tt,datahis);							
						}
						if(k == 0){					
							localStorage.setItem('bkldzrq', rqs);  //交易日期写入缓存
						}
					}else{  //否则取缓存数据
						for (i = 1; i < x; i++){							
							tt = t.split(";")[i];							
							datahis = localStorage.getItem('bkldz' + tt);
							Ctable(tt,datahis);								
						}				
					}				
				}else{   //首次
					for (j = 1; j < x; j++){										
						gethisdata();						
						Ctable(tt,datahis);						
					}							
					localStorage.setItem('bkldzrq', rqs);  //交易日期写入缓存					
				}				
			}
									
			function gethisdata() {				
				day.setTime(day.getTime());				
				for (i = 1; i < 100; i++){	//节假日																										
					day.setTime(day.getTime() - 24*60*60*1000);
					tt = day.Format("yyyy-MM-dd");
					//alert(tt);
					var url = "https://apphis.longhuvip.com/w1/api/index.php?Order=1&a=RealRankingInfo&st=30&apiv=w26&Type=1&c=ZhiShuRanking&PhoneOSNew=1&ZSType=7&Date=" + tt; 										
					var res = [];
					$.ajax({
						type: "get",
						url: url,
						dataType: "text",
						async : false,
						cache:false,
						timeout:3000,						
						success: function(data) {							
							if(data.indexOf("MYSQL数据库链接出错!") == -1 && data.indexOf('"list":[]') == -1 && data.indexOf('"errcode":1020') == -1){
								var arr = JSON.parse(data);
								for (i = 0; i < arr.list.length; i++){
									res.push({"code":arr.list[i][0],"name":arr.list[i][1],"qd":arr.list[i][2],"zf":keepTwoDecimal(arr.list[i][3])});							
								}								
							}else{
								res.push("");
							}														
						}
					});
					if(res[0].length != 0){	
						rqs += tt + ";"
						if(localStorage.getItem('bkldz' + tt) != null) {   //判断有无缓存数据														
							datahis = localStorage.getItem('bkldz' + tt);    //取缓存数据							
						}else{														
							datahis = JSON.stringify(res);
							localStorage.setItem('bkldz' + tt, datahis);  //历史单日数据写入缓存
						}				
						break;
					}					
				}
			}
					
			function Ctable(tt,ss){
				if(tz.indexOf(tt) == -1){
					tz += tt + ";";
				}			
			}
			
			function clearstorage(){
				if(localStorage.getItem('bkldzrq') != null){						
					localStorage.removeItem('bkldzrq'); //清除缓存localStorage
				}
				
				var n = 1;
				while (n > 0)
				{	
					var p = 1;				
					var q = p;
					for (var i = 0; i < localStorage.length; i++) { 
						var key = localStorage.key(i);		 				
						if(key.indexOf('lbtt') > -1 || key.indexOf('bkldz') > -1){
							localStorage.removeItem(key);	
							p++;
						}	
					}
					n = p - q;					
				}
				alert('清除完成');
			}
			
			var datahq = "";
			var lbt = "";
			function lbtt(){  //连板天梯
				var lbs = [];  //初始化数组
				var ts = tz.split(";");	
				lbt = ts[0];				
				for (i = x - 1; i >= 0; i--){			
					datahq = "";					
					if(i == 0 && dt == ts[0]){   //当日为最新交易日
						for (j = 0; j < 5; j++){
							getdata(5 - j, dt);					
						}
						datahq = datahq.replace(/\}\]\[\{/g,"},{");
					}else{
						if(localStorage.getItem('lbtt' + ts[i]) != null) {   //判断有无缓存数据														
							datahq = localStorage.getItem('lbtt' + ts[i]);    //取缓存数据	
						}else{
							for (j = 0; j < 5; j++){
								getdata(5 - j, ts[i]);;					
							}							
							datahq = datahq.replace(/\}\]\[\{/g,"},{");							
							localStorage.setItem('lbtt' + ts[i], datahq);  //历史单日数据写入缓存							
						}
					}
					var data = [];
					var arr = [];
					var lbd = 0;
					var lbd2 = 0;
					if(datahq != ""){
						var hqarr = JSON.parse(datahq);						
						for (i1 = 0; i1 < hqarr.length; i1++){	
							var code = hqarr[i1].code;
							var lb = hqarr[i1].lb;							
							lb = lb.replace("连板","").replace("板","");
							
							if(arr.indexOf(lb) == -1){
								arr.push(lb);
							}							
							
							if(i1 == 0){
								lbd = parseInt(lb);
							}
							if(parseInt(lb) > parseInt(lbd)){  //实际最高板
								lbd = lb;								
							}
							
							if(parseInt(lb) >= parseInt(lbd) || (z == 1 ? parseInt(lb) >= 2 : 0)){  //次高版显示2板及以上
								//data += ss[i1] + "},{";	
								data.push(hqarr[i1]);
							}else{								
								break;
							}							
						}
					}
					arr.push("1");
					arr.sort(function(a,b){ //排序
						return b-a;
					})
					
					lbd = arr[0];
					lbd2 = arr[1];					
					
					var result = data;							
					function up(a,b){
						var	aa = a.lb;
						aa = aa.replace("连板","").replace("板","");
						
						var	bb = b.lb;
						bb = bb.replace("连板","").replace("板","");
						return bb-aa
					}					
					result.sort(up);
					var mc = "";
					var cc = "";
					var mc2 = "";
					var cc2 = "";
					var n = 1;
					for (i2 = 0; i2 < result.length; i2++){	
						var aa = result[i2]["lb"];
						var bb = result[i2]["name"];
												
						if(i2 == 0){
							cc = aa;
							mc = bb;						
						}
						
						if(aa == cc && mc.indexOf(bb) == -1){							
							mc += "\r\n" + bb;						
						}
						
						if(cc2 == "" && aa != cc){
							cc2 = aa;
							mc2 = bb;
						}
						
						if(aa == cc2 && mc2.indexOf(bb) == -1){
							if( n < 4){
								mc2 += "\r\n" + bb;
							}else if( mc2.indexOf("……") == -1){
								mc2 += "\r\n……";
							}
							n++;
						}
					}
					
					lbs.push({"rq":ts[i],"zg1":lbd,"zg2":lbd2,"mc":mc,"mc2":mc2});
					
				}
				
				console.log("lbs",lbs);
				//alert(JSON.stringify(lbs));				
				//document.write(JSON.stringify(lbs));
				GetChart(lbs);
			}
			
			function getdata(i, rq) {			
				var url1 = "https://apphq.longhuvip.com/w1/api/index.php?Order=0&a=DailyLimitPerformance&st=60&apiv=w21&Type=4&c=HomeDingPan&PidType=" + i; 								
				var url2 = "https://apphis.longhuvip.com/w1/api/index.php?Order=0&a=DailyLimitPerformance&st=1000&apiv=w26&Type=4&c=HisHomeDingPan&Index=0&PidType=" + i + "&Day=" + rq;
				
				var url = url1;
				if(k == "1" || dt != rq){
					url = url2;
				}									
				var res = [];
				$.ajax({
					type: "get",
					url: url,
					dataType: "json",
					async : false,
					cache:false,
					timeout:3000,					
					success: function(data) {
						//alert(JSON.stringify(data))						
						//document.write(JSON.stringify(data));								
						if(data.info[0].length > 0){					
							for (var j = 0; j < data.info[0].length; j++){								
								var lbs = data.info[0][j][15] + "连板";
								lbs = lbs.replace("1连板","1板");
								res.push({"code":data.info[0][j][0],"name":data.info[0][j][1],"fde":NumberTransform(data.info[0][j][6]),"lb":lbs,"ztyy":data.info[0][j][5]});							
							}							
						}
					}
				});					
				if(res.length > 0){
					datahq += JSON.stringify(res);					
				}else{
					datahq += "";
				}										
			}			
			
			function getParamValues(name, arr) {
				var ret = []
				for (var i = 0, len = arr.length; i < len; i++) {
					ret.push(arr[i][name])
				}
				return ret
			}
		</script>
		
	
	<script>
			function GetChart(arr) {
				document.getElementById("charts3").removeAttribute("_echarts_instance_");			
				var myChart = echarts.init(document.getElementById('charts3'));
				var n1 = 0;
				var n2 = 0;
				var option = {
					title:{
						left:'left',						
						//text: '实时资金流向',
						textStyle:{ //设置主标题风格
							color:'#FFFF00',//设置主标题字体颜色
							fontStyle:'normal',//主标题文字风格
							fontSize: 14
						}
					},
					<!-- tooltip: {   //提示框 -->
						<!-- trigger: 'axis', -->
						<!-- showContent: false, -->
						<!-- axisPointer: { -->
							<!-- type: 'cross', -->
							<!-- label: { -->
								<!-- formatter: function (params) {									 -->
									<!-- return params.value									 -->
								<!-- }, -->
								<!-- backgroundColor: '#000' -->
							<!-- }, -->
							<!-- crossStyle: {								 -->
								<!-- textStyle:{  -->
									<!-- color: '#fff'									 -->
								<!-- } -->
							<!-- },							  -->
						<!-- },	 -->
						<!-- textStyle:{ 								 -->
							<!-- fontSize: 12 -->
						<!-- }, -->
						<!-- formatter(params) {  //添加文字 -->
							<!-- if(params[0].name != "null"){ -->
								<!-- var str = params[0].name + '<br />'						   -->
								<!-- params.forEach(item => {																							 -->
									<!-- str += '<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;left:5px;background-color:' + item.color + '"></span>' + item.seriesName + " : " + NumberTransform(item.data) + "<br />"; -->
								<!-- }) -->
								<!-- return str; -->
							<!-- } -->
						<!-- } -->
					<!-- },						 -->
					grid: { // 边距
					  left: '1%',
					  right: '1%',
					  bottom: '10%',
					  top: '10%',					  
					},
					legend: {   // 图例
						show: true,
						orient: 'horizontal',  //布局 默认横向布局'horizontal'，纵向布局’vertical’
						//x:'left',
						//y:'top',						
						type: "plain", // 图例的类型 'plain':普通图例  'scroll':可滚动翻页的图例
						zlevel: 1, // 所有图形的 zlevel 值。
						icon: "circle",  //控制形状  类型包括 circle 圆形，triangle 三角形，diamond 四边形，arrow 变异三角形，none 无
						top: "0%", // bottom:"20%" // 组件离容器的距离
						left: "1%", //left:"10%"  // // 组件离容器的距离         
						padding: 5, // 图例内边距	
						align: "auto", // 图例标记和文本的对齐
						itemGap: 30, // 图例每项之间的间隔。
						itemWidth: 15,     // 图例标记的图形宽度
						itemHeight: 12,      // 图例标记的图形高度// 使用字符串模板，模板变量为图例名称 {name}	
						<!-- formatter: function (item) {							 -->
							<!-- return item.substr(0,2) + jlr.split("," + item)[1].split(",")[0] -->
						<!-- }, -->
						textStyle: {
							color: "#fff", // 文字的颜色。								
						}
					},					
					xAxis: [		//x轴设置		  
						{
							type: 'category',								
							data: getParamValues('rq', arr),							
							axisLine:{  //x轴坐标线设置
								lineStyle:{
									type: 'dotted',   //坐标轴虚线（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
									color:"#D3D3D3",  //x轴坐标线颜色
									//width: 2   // 坐标轴线宽
								}
							},
							axisTick: {   //x轴刻度
								show:false, 
							},
							axisLabel:{	 //x轴标签设置	
								interval: 0,
								<!-- formatter: function (value, index) {									 -->
									 <!-- if(value=="09:31" || value=="10:30" || value=="11:30" || value=="14:00" || value=="15:00"){ -->
										<!-- return value -->
									 <!-- } -->
								 <!-- }, -->
								textStyle:{  //x轴文字
									color:"#FFF"
								}
							},
							axisPointer: {
								type: 'shadow',								
							}
						}
					],

					yAxis: [  //y轴
						{
							type: 'value',
							<!-- min: function(value) {//取最小值向下取整为最小刻度									 -->
								<!-- return Math.floor(value.min) -->
							<!-- }, -->
							max: function(value) {//取最大值向上取整为最大刻度								
								return  Math.ceil(value.max + 1) 								
							},
							interval: function (value) { // 刻度间隔
								if(value.max < 0){
									return  Math.ceil(value.min) 
								}else{
									return  Math.ceil(value.max)
								}									
							},								
							splitLine:{ //y轴网格线									
								show:false,
								lineStyle: { 								
									color: '#D3D3D3', 
									width: 1,    
									type: 'dotted', //（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								} 
							},
							axisLine: { //y轴坐标线设置
								show: true, 									
								lineStyle: { 									
									color: '#D3D3D3', //y轴颜色
									//width: 2,    // 坐标轴线宽
									type: 'dotted',     // 坐标轴线线的类型（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								} 
							},
							axisTick: {   //y轴刻度
								show:false, 
							},
							axisLabel: {  //y轴标签设置
								show: true,
								color: '#fff',									
								formatter: function (value){
									return value
								}
							}
						},
					],					
					series: [						
						{							
							name: '最高板',
							data: getParamValues('zg1', arr),							
							type: 'line',								
							symbol: 'circle',//拐点样式‘circle’, ‘rect’, ‘roundRect’, ‘triangle’, ‘diamond’, ‘pin’, ‘arrow’ 
							symbolSize: 1,//拐点大小														
							label: {
								normal: {
									show: true,
									<!-- position: 'top', -->
									offset:[0,0],
									formatter:function(param){										
										console.log(n1);
										n1++;
										return param.value  + "连板：\r\n" + arr[n1-1]["mc"] ;																			
									},
									textStyle:{//拐点上标字体大小颜色
										align:'left',
										lineHeight:15,										
										color:'#FFA07A',
										fontSize:'12',
									}	
								}
							},
							itemStyle: {
							  normal: {
								lineStyle: {
								type:'solid', //'dotted'点型虚线 'solid'实线 'dashed'线性虚线
								  width: 1,//折线宽度
								  color: "#FF0000"//折线颜色
								},
								
								color: '#FF0000',//拐点颜色
								borderColor: '#fff',//拐点边框颜色
								//borderWidth: 1,//拐点边框大小
							  },
							  emphasis: {  //hover设置，不设置可跟随前面定义
								//color: '#FF0000',//hover拐点颜色定义								
								//borderColor: '#fff',//hover拐点边框颜色
								//borderWidth: 1,//hover拐点边框大小
								
							  }
							},
						},
						{
							name: '次高板',
							data: getParamValues('zg2', arr),
							type: 'line',								
							symbolSize: 1,
							label: {
								normal: {
									show: true,
									position: 'bottom',
									offset:[0,0],
									formatter:function(param){
										console.log(param.value);
										n2++;
										return (param.value + "连板：\r\n" + arr[n2-1]["mc2"]).replace("1连板：","1板") ;											
									},
									textStyle:{//拐点上标字体大小颜色
										align:'left',
										lineHeight:15,	
										color:'#FFF0F5',
										fontSize:'12',
									}	
								}
							},
							itemStyle: {
							  normal: {
								lineStyle: {
								type:'dashed', //'dotted'点型虚线 'solid'实线 'dashed'线性虚线
								  width: 1,
								  color: "#FF00FF"
								},
								color: "#FF00FF",
							  },
							  emphasis: {
								color: '#FF00FF'
							  }
							},
						}					
					]
				}					
				myChart.setOption(option);
			}
		</script>
	</body>
</html>